home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xaw / textsinkp.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  4KB  |  122 lines

  1. /*
  2. * $XConsortium: TextSinkP.h,v 1.4 90/04/30 17:46:39 converse Exp $
  3. */
  4.  
  5.  
  6. /***********************************************************
  7. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  8. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  9.  
  10.                         All Rights Reserved
  11.  
  12. Permission to use, copy, modify, and distribute this software and its 
  13. documentation for any purpose and without fee is hereby granted, 
  14. provided that the above copyright notice appear in all copies and that
  15. both that copyright notice and this permission notice appear in 
  16. supporting documentation, and that the names of Digital or MIT not be
  17. used in advertising or publicity pertaining to distribution of the
  18. software without specific, written prior permission.  
  19.  
  20. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  21. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  22. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  23. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  24. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  25. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  26. SOFTWARE.
  27.  
  28. ******************************************************************/
  29.  
  30. /* 
  31.  * TextSinkP.h - Private definitions for TextSink object
  32.  * 
  33.  */
  34.  
  35. #ifndef _XawTextSinkP_h
  36. #define _XawTextSinkP_h
  37.  
  38. /***********************************************************************
  39.  *
  40.  * TextSink Object Private Data
  41.  *
  42.  ***********************************************************************/
  43.  
  44. #include <X11/ObjectP.h>
  45. #include <X11/Xaw/TextP.h>    /* This source works with the Text widget. */
  46. #include <X11/Xaw/TextSrcP.h>    /* This source works with the Text Source. */
  47. #include <X11/Xaw/TextSink.h>
  48.  
  49. /************************************************************
  50.  *
  51.  * New fields for the TextSink object class record.
  52.  *
  53.  ************************************************************/
  54.  
  55. typedef struct _TextSinkClassPart {
  56.   void (*DisplayText)();
  57.   void (*InsertCursor)();
  58.   void (*ClearToBackground)();
  59.   void (*FindPosition)();
  60.   void (*FindDistance)();
  61.   void (*Resolve)();
  62.   int  (*MaxLines)();
  63.   int  (*MaxHeight)();
  64.   void (*SetTabs)();        
  65.   void (*GetCursorBounds)();    
  66. } TextSinkClassPart;
  67.  
  68. /* Full class record declaration */
  69. typedef struct _TextSinkClassRec {
  70.     ObjectClassPart     object_class;
  71.     TextSinkClassPart    text_sink_class;
  72. } TextSinkClassRec;
  73.  
  74. extern TextSinkClassRec textSinkClassRec;
  75.  
  76. /* New fields for the TextSink object record */
  77. typedef struct {
  78.     /* resources */
  79.     XFontStruct    *font;        /* Font to draw in. */
  80.     Pixel foreground;        /* Foreground color. */
  81.     Pixel background;        /* Background color. */
  82.  
  83.     /* private state. */
  84.     Position *tabs;        /* The tab stops as pixel values. */
  85.     short    *char_tabs;    /* The tabs stops as character values. */
  86.     int      tab_count;        /* number of items in tabs */
  87.  
  88. } TextSinkPart;
  89.  
  90. /****************************************************************
  91.  *
  92.  * Full instance record declaration
  93.  *
  94.  ****************************************************************/
  95.  
  96. typedef struct _TextSinkRec {
  97.   ObjectPart    object;
  98.   TextSinkPart    text_sink;
  99. } TextSinkRec;
  100.  
  101. /************************************************************
  102.  *
  103.  * Private declarations.
  104.  *
  105.  ************************************************************/
  106.  
  107. typedef int (*_XawSinkIntFunc)();
  108. typedef void (*_XawSinkVoidFunc)();
  109.  
  110. #define XtInheritDisplayText          ((_XawSinkVoidFunc) _XtInherit)
  111. #define XtInheritInsertCursor         ((_XawSinkVoidFunc) _XtInherit)
  112. #define XtInheritClearToBackground    ((_XawSinkVoidFunc) _XtInherit)
  113. #define XtInheritFindPosition         ((_XawSinkVoidFunc) _XtInherit)
  114. #define XtInheritFindDistance         ((_XawSinkVoidFunc) _XtInherit)
  115. #define XtInheritResolve              ((_XawSinkVoidFunc) _XtInherit)
  116. #define XtInheritMaxLines             ((_XawSinkIntFunc) _XtInherit)
  117. #define XtInheritMaxHeight            ((_XawSinkIntFunc) _XtInherit)
  118. #define XtInheritSetTabs              ((_XawSinkVoidFunc) _XtInherit)
  119. #define XtInheritGetCursorBounds      ((_XawSinkVoidFunc) _XtInherit)
  120.  
  121. #endif /* _XawTextSinkP_h */
  122.